home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ASME's Mechanical Engine…ing Toolkit 1997 December
/
ASME's Mechanical Engineering Toolkit 1997 December.iso
/
elec_eng
/
eepddsk4.lzh
/
INDUCTOR.ASC
< prev
next >
Wrap
Text File
|
1986-04-16
|
10KB
|
326 lines
10 REM
20 REM INDUCTOR DESIGN AND TWIDDLING PROGRAM
30 REM -------------------------------------
40 REM BY KEVIN MCCLANING.
50 REM
60 REM
70 CLS:PRINT
80 PRINT" INDUCTOR DESIGN AND TWIDDLING PROGRAM"
90 PRINT" -------------------------------------"
100 PRINT
110 PRINT " THIS PROGRAM ALLOWS THE USER TO DESIGN INDUCTORS OF"
120 PRINT "SPECIFIC VALUE AND CONVERT CYLINDRICAL AIR-CORE INDUCTORS INTO"
130 PRINT "TOROIDAL FORMS (AND VISA VERSA)."
140 PRINT
150 PRINT " NOTE: THE CYLINDRICAL INDUCTOR EQUATIONS USED IN THIS"
160 PRINT "PROGRAM ARE FROM THE AMATUER RADIO HANDBOOK (1979 EDITION)."
170 PRINT "THEY ARE VALID ONLY FOR CYLINDRICAL INDUCTORS WHOSE LENGTH"
180 PRINT "IS GREATER THAN 0.8 TIMES THE COIL RADIUS. BEYOND THAT,"
190 PRINT "YOU'RE ON YOUR OWN."
200 GOSUB 2920
210 PRINT "WHAT'LL IT BE:"
220 PRINT " 1 - CYLINDRICAL TO TOROID CONVERSION"
230 PRINT " 2 - TOROID TO CYLINDRICAL CONVERSION"
240 PRINT " 3 - DESIGN CYLINDRICAL, AIR CORE INDUCTORS"
250 PRINT " 4 - DESIGN TOROIDAL INDUCTORS"
260 PRINT " 5 - VERIFY CYLINDRICAL INDUCTORS"
270 PRINT " 6 - VERIFY TOROIDAL INDUCTORS"
280 PRINT " 7 - EXIT"
290 INPUT ANS
300 IF ANS = 1 THEN 380
310 IF ANS = 2 THEN 840
320 IF ANS = 3 THEN 1300
330 IF ANS = 4 THEN 1700
340 IF ANS = 5 THEN 2040
350 IF ANS = 6 THEN 2440
360 IF ANS = 7 THEN CLS:END
370 BEEP:GOTO 200
380 REM
390 REM
400 REM
410 REM
420 REM CYLINDRICAL TO TOROID CONVERSION
430 REM
440 REM
450 GOSUB 2920
460 PRINT"CYLINDRICAL TO TOROID CONVERSION":PRINT
470 INPUT "ENTER NUMBER OF TURNS ON CYLINDRICAL INDUCTOR";NCYL
480 INPUT "ENTER INDUCTOR DIAMETER (INCHES)";DIA:RADIUS=DIA/2
490 INPUT "ENTER INDUCTOR LENGTH (INCHES)";LENGTH
500 REM
510 REM FIGURE OUT INDUCTANCE
520 REM
530 IND = (RADIUS*RADIUS*NCYL*NCYL)/((9*RADIUS)+(10*LENGTH))
540 REM
550 INPUT "ENTER TOROID PERMEABILITY (uH/100 turns)";ASUBL
560 REM
570 REM FIGURE OUT # OF TOROID TURNS
580 REM
590 NTOR = 100*(SQR(IND/ASUBL))
600 REM
610 REM OUTPUT RESULTS
620 REM
630 GOSUB 2920
640 PRINT "CYLINDRICAL INDUCTOR (L = ";INT(IND*1000)/1000;" uH):"
650 PRINT " NUMBER TURNS = ";INT(NCYL*10)/10
660 PRINT " DIAMETER = ";INT(DIA*100)/100;" INCHES"
670 PRINT " LENGTH = ";INT(LENGTH*100)/100;" INCHES"
680 PRINT
690 PRINT "TOROIDAL INDUCTOR (L = ";INT(IND*1000)/1000;" uH):"
700 PRINT " PERMEABILITY =";ASUBL;" uH/100 turns"
710 PRINT " NUMBER TURNS = ";INT(NTOR*10)/10
720 GOSUB 2920
730 PRINT "WHAT'LL IT BE:"
740 PRINT " 1 - ENTER ANOTHER TOROID PERMEABILITY"
750 PRINT " 2 - DEFINE ANOTHER CYLINDRICAL INDUCTOR"
760 PRINT " 3 - PRINT"
770 PRINT " 4 - MAIN MENU"
780 INPUT ANS
790 IF ANS = 1 THEN GOTO 550
800 IF ANS = 2 THEN GOTO 380
810 IF ANS = 3 THEN GOSUB 2960:GOTO 720
820 IF ANS = 4 THEN GOTO 200
830 BEEP:GOTO 730
840 REM
850 REM
860 REM
870 REM
880 REM CYLINDRICAL TO TOROID CONVERSION
890 REM
900 REM
910 GOSUB 2920
920 PRINT"TOROID TO CYLINDRICAL CONVERSION":PRINT
930 INPUT "ENTER TOROID PERMEABILITY (uH/100 turns)";ASUBL
940 INPUT "ENTER NUMBER OF TURNS ON TOROID";NTOR
950 REM
960 REM FIGURE OUT INDUCTANCE OF TOROID
970 REM
980 IND = ASUBL*NTOR*NTOR/10000
990 REM
1000 INPUT "ENTER CYLINDRICAL INDUCTOR DIAMETER (INCHES)";DIA:RADIUS=DIA/2
1010 INPUT "ENTER INDUCTOR LENGTH (INCHES)";LENGTH
1020 REM
1030 REM FIGURE OUT # OF CYLINDRICAL INDUCTOR TURNS
1040 REM
1050 NCYL = (SQR(IND*(9*RADIUS+10*LENGTH)))/RADIUS
1060 REM
1070 REM OUTPUT RESULTS
1080 REM
1090 GOSUB 2920
1100 PRINT "CYLINDRICAL INDUCTOR (L = ";INT(IND*1000)/1000;" uH):"
1110 PRINT " NUMBER TURNS = ";INT(NCYL*10)/10
1120 PRINT " DIAMETER = ";INT(DIA*100)/100;" INCHES"
1130 PRINT " LENGTH = ";INT(100*LENGTH)/100;" INCHES"
1140 PRINT
1150 PRINT "TOROIDAL INDUCTOR (L = ";INT(IND*1000)/1000;" uH):"
1160 PRINT " PERMEABILITY =";ASUBL;" uH/100 turns"
1170 PRINT " NUMBER TURNS = ";INT(NTOR*10)/10
1180 GOSUB 2920
1190 PRINT "WHAT'LL IT BE:"
1200 PRINT " 1 - ENTER ANOTHER CYLINDRICAL INDUCTOR"
1210 PRINT " 2 - DEFINE ANOTHER TOROIDAL INDUCTOR"
1220 PRINT " 3 - PRINT"
1230 PRINT " 4 - MAIN MENU"
1240 INPUT ANS
1250 IF ANS = 1 THEN GOTO 1000
1260 IF ANS = 2 THEN GOTO 840
1270 IF ANS = 3 THEN GOSUB 2960:GOTO1040
1280 IF ANS = 4 THEN GOTO 200
1290 BEEP:GOTO 1190
1300 REM
1310 REM
1320 REM
1330 REM
1340 REM CYLINDRICAL INDUCTOR DESIGN
1350 REM
1360 REM
1370 GOSUB 2920
1380 PRINT"CYLINDRICAL INDUCTOR DESIGN":PRINT
1390 GOSUB 2840
1400 GOSUB 2860
1410 GOSUB 2880
1420 REM
1430 REM FIGURE OUT NUMBER OF TURNS NEEDED
1440 REM
1450 NCYL = (SQR(IND*(9*RADIUS+10*LENGTH)))/RADIUS
1460 REM
1470 REM OUTPUT RESULTS
1480 REM
1490 GOSUB 2920
1500 PRINT "CYLINDRICAL INDUCTOR (L = ";INT(IND*1000)/1000;" uH):"
1510 PRINT " NUMBER TURNS = ";INT(NCYL*10)/10
1520 PRINT " DIAMETER = ";INT(100*DIA)/100;" INCHES"
1530 PRINT " LENGTH = ";INT(100*LENGTH)/100;" INCHES"
1540 GOSUB 2920
1550 PRINT "WHAT'LL IT BE:"
1560 PRINT " 1 - CHANGE INDUCTOR DIAMETER"
1570 PRINT " 2 - CHANGE INDUCTOR LENGTH"
1580 PRINT " 3 - CHANGE INDUCTANCE"
1590 PRINT " 4 - START A NEW INDUCTOR"
1600 PRINT " 5 - PRINT"
1610 PRINT " 6 - MAIN MENU"
1620 INPUT ANS
1630 IF ANS = 1 THEN GOSUB 2840:GOTO 1420
1640 IF ANS = 2 THEN GOSUB 2860:GOTO 1420
1650 IF ANS = 3 THEN GOSUB 2880:GOTO 1420
1660 IF ANS = 4 THEN GOTO 1300
1670 IF ANS = 5 THEN GOSUB 3070:GOTO 1540
1680 IF ANS = 6 THEN GOTO 200
1690 BEEP:GOTO 1540
1700 REM
1710 REM
1720 REM
1730 REM
1740 REM TOROIDAL INDUCTOR DESIGN
1750 REM
1760 REM
1770 GOSUB 2920
1780 PRINT"TOROIDAL INDUCTOR DESIGN":PRINT
1790 GOSUB 3500
1800 GOSUB 3520
1810 REM
1820 REM FIGURE OUT NUMBER OF TURNS NEEDED
1830 REM
1840 NTOR = 100*(SQR(IND/ASUBL))
1850 REM
1860 REM OUTPUT RESULTS
1870 REM
1880 GOSUB 2920
1890 PRINT "TOROIDAL INDUCTOR (L = ";INT(IND*1000)/1000;" uH):"
1900 PRINT " PERMEABILITY =";ASUBL;" uH/100 turns"
1910 PRINT " NUMBER TURNS = ";INT(NTOR*10)/10
1920 GOSUB 2920
1930 PRINT "WHAT'LL IT BE:"
1940 PRINT " 1 - ENTER ANOTHER TOROID PERMABILITY"
1950 PRINT " 2 - ENTER ANOTHER DESIRED INDUCTANCE VALUE"
1960 PRINT " 3 - PRINT"
1970 PRINT " 4 - MAIN MENU"
1980 INPUT ANS
1990 IF ANS = 1 THEN GOSUB 3520:GOTO 1820
2000 IF ANS = 2 THEN GOSUB 3500:GOTO 1820
2010 IF ANS = 3 THEN GOSUB 3140:GOTO 1920
2020 IF ANS = 4 THEN GOTO 200
2030 BEEP:GOTO 1920
2040 REM
2050 REM
2060 REM
2070 REM
2080 REM CYLINDRICAL INDUCTOR VERIFICATION
2090 REM
2100 REM
2110 GOSUB 2920
2120 PRINT"CYLINDRICAL INDUCTOR VERIFICATION":PRINT
2130 GOSUB 2900
2140 GOSUB 2840
2150 GOSUB 2860
2160 REM
2170 REM FIGURE OUT INDUCTANCE
2180 REM
2190 IND = (RADIUS*RADIUS*NCYL*NCYL)/((9*RADIUS)+(10*LENGTH))
2200 REM
2210 REM OUTPUT RESULTS
2220 REM
2230 GOSUB 2920
2240 PRINT "CYLINDRICAL INDUCTOR (L = ";INT(IND*1000)/1000;" uH):"
2250 PRINT " NUMBER TURNS = ";INT(NCYL*10)/10
2260 PRINT " DIAMETER = ";INT(DIA*100)/100;" INCHES"
2270 PRINT " LENGTH = ";INT(LENGTH*100)/100;" INCHES"
2280 GOSUB 2920
2290 PRINT "WHAT'LL IT BE:"
2300 PRINT " 1 - CHANGE INDUCTOR DIAMETER"
2310 PRINT " 2 - CHANGE INDUCTOR LENGTH"
2320 PRINT " 3 - CHANGE NUMBER OF TURNS"
2330 PRINT " 4 - START A NEW INDUCTOR"
2340 PRINT " 5 - PRINT"
2350 PRINT " 6 - MAIN MENU"
2360 INPUT ANS
2370 IF ANS = 1 THEN GOSUB 2840:GOTO 2170
2380 IF ANS = 2 THEN GOSUB 2860:GOTO 2170
2390 IF ANS = 3 THEN GOSUB 2900:GOTO 2170
2400 IF ANS = 4 THEN GOTO 2130
2410 IF ANS = 5 THEN GOSUB 3070:GOTO 2170
2420 IF ANS = 6 THEN GOTO 200
2430 BEEP:GOTO 1540
2440 REM
2450 REM
2460 REM
2470 REM
2480 REM TOROIDAL INDUCTOR VERIFICATION
2490 REM
2500 REM
2510 GOSUB 2920
2520 PRINT"TOROIDAL INDUCTOR VERIFICATION":PRINT
2530 GOSUB 3190
2540 GOSUB 3210
2550 REM
2560 REM FIGURE OUT INDUCTANCE OF TOROID
2570 REM
2580 IND = ASUBL*NTOR*NTOR/10000
2590 REM
2600 REM OUTPUT RESULTS
2610 REM
2620 GOSUB 2920
2630 PRINT "TOROIDAL INDUCTOR (L = ";INT(IND*1000)/1000;" uH):"
2640 PRINT " PERMEABILITY =";ASUBL;" uH/100 turns"
2650 PRINT " NUMBER TURNS = ";INT(NTOR*10)/10
2660 GOSUB 2920
2670 PRINT "WHAT'LL IT BE:"
2680 PRINT " 1 - ENTER ANOTHER TOROID PERMEABILITY"
2690 PRINT " 2 - ENTER NEW NUMBER OF TURNS"
2700 PRINT " 3 - ENTER BOTH"
2710 PRINT " 4 - PRINT"
2720 PRINT " 5 - MAIN MENU"
2730 INPUT ANS
2740 IF ANS = 1 THEN GOSUB 3190:GOTO 2560
2750 IF ANS = 2 THEN GOSUB 3210:GOTO 2560
2760 IF ANS = 3 THEN GOTO 2530
2770 IF ANS = 4 THEN GOSUB 3140:GOTO 2660
2780 IF ANS = 5 THEN GOTO 200
2790 BEEP:GOTO 2660
2800 REM
2810 REM
2820 REM SUBROUTINES
2830 REM
2840 INPUT "ENTER INDUCTOR DIAMETER (INCHES)";DIA:RADIUS=DIA/2:RETURN
2850 REM
2860 INPUT "ENTER INDUCTOR LENGTH (INCHES)";LENGTH:RETURN
2870 REM
2880 INPUT "ENTER DESIRED INDUCTANCE (uH)";IND:RETURN
2890 REM
2900 INPUT "ENTER NUMBER OF TURNS ON CYLINDRICAL INDUCTOR";NCYL:RETURN
2910 REM
2920 PRINT "--------------------------------":RETURN
2930 REM
2940 LPRINT "--------------------------------":RETURN
2950 REM
2960 GOSUB 2940
2970 LPRINT "CYLINDRICAL INDUCTOR (L = ";INT(IND*1000)/1000;" uH):"
2980 LPRINT " NUMBER TURNS = ";INT(NCYL*10)/10
2990 LPRINT " DIAMETER = ";INT(DIA*100)/100;" INCHES"
3000 LPRINT " LENGTH = ";INT(LENGTH*100)/100;" INCHES"
3010 LPRINT
3020 LPRINT "TOROIDAL INDUCTOR (L = ";INT(IND*1000)/1000;" uH):"
3030 LPRINT " PERMEABILITY =";ASUBL;" uH/100 turns"
3040 LPRINT " NUMBER TURNS = ";INT(NTOR*10)/10
3050 GOSUB 2940:RETURN
3060 REM
3070 GOSUB 2940
3080 LPRINT "CYLINDRICAL INDUCTOR (L = ";INT(IND*1000)/1000;" uH):"
3090 LPRINT " NUMBER TURNS = ";INT(NCYL*10)/10
3100 LPRINT " DIAMETER = ";INT(100*DIA)/100;" INCHES"
3110 LPRINT " LENGTH = ";INT(100*LENGTH)/100;" INCHES"
3120 GOSUB 2940:RETURN
3130 REM
3140 GOSUB 2940
3150 LPRINT "TOROIDAL INDUCTOR (L = ";INT(IND*1000)/1000;" uH):"
3160 LPRINT " PERMEABILITY =";ASUBL;" uH/100 turns"
3170 LPRINT " NUMBER TURNS = ";INT(NTOR*10)/10
3180 GOSUB 2940:RETURN
3190 INPUT "ENTER TOROID PERMEABILITY (uH/100 turns)";ASUBL:RETURN
3200 REM
3210 INPUT "ENTER NUMBER OF TURNS ON TOROID";NTOR:RETURN
3220 REM
3500 INPUT "ENTER DESIRED INDUCTANCE (uH)";IND:RETURN
3510 REM
3520 INPUT "ENTER TOROID PERMEABILITY (uH/100 turns)";ASUBL:RETURN